\(\int \frac {a+\frac {b}{x}}{x} \, dx\) [1553]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 11 \[ \int \frac {a+\frac {b}{x}}{x} \, dx=-\frac {b}{x}+a \log (x) \]

[Out]

-b/x+a*ln(x)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {14} \[ \int \frac {a+\frac {b}{x}}{x} \, dx=a \log (x)-\frac {b}{x} \]

[In]

Int[(a + b/x)/x,x]

[Out]

-(b/x) + a*Log[x]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {b}{x^2}+\frac {a}{x}\right ) \, dx \\ & = -\frac {b}{x}+a \log (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \frac {a+\frac {b}{x}}{x} \, dx=-\frac {b}{x}+a \log (x) \]

[In]

Integrate[(a + b/x)/x,x]

[Out]

-(b/x) + a*Log[x]

Maple [A] (verified)

Time = 0.02 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.09

method result size
default \(-\frac {b}{x}+a \ln \left (x \right )\) \(12\)
norman \(-\frac {b}{x}+a \ln \left (x \right )\) \(12\)
risch \(-\frac {b}{x}+a \ln \left (x \right )\) \(12\)
parallelrisch \(\frac {a \ln \left (x \right ) x -b}{x}\) \(14\)

[In]

int((a+b/x)/x,x,method=_RETURNVERBOSE)

[Out]

-b/x+a*ln(x)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.18 \[ \int \frac {a+\frac {b}{x}}{x} \, dx=\frac {a x \log \left (x\right ) - b}{x} \]

[In]

integrate((a+b/x)/x,x, algorithm="fricas")

[Out]

(a*x*log(x) - b)/x

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.64 \[ \int \frac {a+\frac {b}{x}}{x} \, dx=a \log {\left (x \right )} - \frac {b}{x} \]

[In]

integrate((a+b/x)/x,x)

[Out]

a*log(x) - b/x

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \frac {a+\frac {b}{x}}{x} \, dx=a \log \left (x\right ) - \frac {b}{x} \]

[In]

integrate((a+b/x)/x,x, algorithm="maxima")

[Out]

a*log(x) - b/x

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.09 \[ \int \frac {a+\frac {b}{x}}{x} \, dx=a \log \left ({\left | x \right |}\right ) - \frac {b}{x} \]

[In]

integrate((a+b/x)/x,x, algorithm="giac")

[Out]

a*log(abs(x)) - b/x

Mupad [B] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \frac {a+\frac {b}{x}}{x} \, dx=a\,\ln \left (x\right )-\frac {b}{x} \]

[In]

int((a + b/x)/x,x)

[Out]

a*log(x) - b/x